﻿@model WordSmith_V1.ViewModel.BookSummaryViewModel
@{

    Layout = "~/Views/Shared/_AuthenticatedPagesLayout.cshtml";
}


 <fieldset>
        <legend>Book Summary</legend>
        <div>
       
        @Model.Book.Title</div>
        <div>@Model.Book.Image</div>
        <div> 
        <span class="labelSpan">Genre:</span>
        @Model.GenreName
        </div>
        <div>
        <span class="labelSpan">Current List of Authors:</span>
            @foreach (var item in @Model.Book.Authors)
            {
                <span class="block">@item.FirstName &nbsp; @item.LastName</span>
            }
        </div>
        <div>
        <span class="labelSpan block">Current List of Chapters:</span>
            @foreach (var item in @Model.Book.Chapters)
            {
                <div class="block">
                <span>@item.Title &nbsp;</span>
                
                <span class="labelSpan">STATUS:</span><span> @(@item.StatusId == 1 ? "PENDING PUBLICATION APPROVAL" : "APPROVED")</span>
                </div>
            }
        </div>
        <div>
             <input type="submit" value="Add Chapter" name="Add Chapter" id="add" onclick="location.href='@Url.Action("Create", "Chapter", new { bookId = Model.Book.BookId })'"/>
             <input type="submit" value="Publish" name="Publish" id="publish" onclick="location.href='@Url.Action("Publish","Book")'"/>
             <input type="submit" value="Continue" name="Publish" id="publish" onclick="location.href='@Url.Action("Index","User")'"/>
        </div>
        </fieldset>
             